<template>
    <div>
        <van-nav-bar
        title="添加地址"
        left-text="返回"
        left-arrow
        @click-left="onClickLeft"
        />
        <van-cell-group>
        <van-field v-model="from.name" label="姓名" />
        <van-field v-model="from.tel" type="tel" label="手机号" />
        <van-field v-model="from.address" label="地址" />
        </van-cell-group>
        <van-button block type="danger" round @click="add">提交</van-button>
    </div>
</template>
<script>
import { areaList } from '@vant/area-data';
export default {
  data() {
    return {
        areaList,
        from:{
            name:'',
            tel:'',
            address:''
        }
    };
  },
  methods: {
    onClickLeft(){
        this.$router.back()
    },
    add(){
        console.log(this.from)
    }
},
};
</script>